<template>
  <el-container class="home-container">
    <!--头布局-->
    <el-header>
      <div>
        <img src="../assets/img.jpg" alt="">
        <span>后台管理系统</span>
      </div>
      <el-button type="info" @click="logout">退出</el-button>
    </el-header>
    <!--主体区域-->
    <el-container>
      <!--侧边栏-->
      <el-aside width="220px">
        <!--侧边栏区域-->
        <el-menu
                background-color="#324157"
                text-color="#fff"
                active-text-color="#ffd04b">
          <!--菜单-->
          <el-submenu index="1">
            <!--一级菜单的区域-->
            <template slot="title">
              <!--图标-->
              <i class="el-icon-location"></i>
              <!--文本名称-->
              <span>导航一</span>
            </template>
            <!--二级菜单-->
            <el-menu-item index="1-4">
              <template slot="title">
                <!--图标-->
                <i class="el-icon-location"></i>
                <!--文本-->
                <span>首页</span>
              </template>
            </el-menu-item>
          </el-submenu>
          <!--2-->
          <el-submenu index="1">
            <!--一级菜单的区域-->
            <template slot="title">
              <!--图标-->
              <i class="el-icon-location"></i>
              <!--文本名称-->
              <span>导航一</span>
            </template>
            <!--二级菜单-->
            <el-menu-item index="1-4">
              <template slot="title">
                <!--图标-->
                <i class="el-icon-location"></i>
                <!--文本-->
                <span>首页</span>
              </template>
            </el-menu-item>
          </el-submenu>
          <!--3-->
          <el-submenu index="1">
            <!--一级菜单的区域-->
            <template slot="title">
              <!--图标-->
              <i class="el-icon-location"></i>
              <!--文本名称-->
              <span>导航一</span>
            </template>
            <!--二级菜单-->
            <el-menu-item index="1-4">
              <template slot="title">
                <!--图标-->
                <i class="el-icon-location"></i>
                <!--文本-->
                <span>首页</span>
              </template>
            </el-menu-item>
          </el-submenu>
          <!--4-->
          <el-submenu index="1">
            <!--一级菜单的区域-->
            <template slot="title">
              <!--图标-->
              <i class="el-icon-location"></i>
              <!--文本名称-->
              <span>导航一</span>
            </template>
            <!--二级菜单-->
            <el-menu-item index="1-4">
              <template slot="title">
                <!--图标-->
                <i class="el-icon-location"></i>
                <!--文本-->
                <span>首页</span>
              </template>
            </el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-container>
        <!--主区域-->
        <el-main>Main</el-main>
        <!--底部区域-->
        <el-footer style="height:40px">
          @2020-2025侵权必究-蓝泺官网
        </el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods: {
    logout() {
      window.sessionStorage.clear()
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
  .home-container{
    height: 100%;
  }
  .el-header{
    background-color:#242F42;
    display: flex;
    justify-content: space-between;
    padding-left: 0;
    align-items: center;
    color: #F7F7F7;
    font-size: 20px;
    >div{
      display: flex;
      align-items: center;
      span{
        margin-left: 15px;
      }
      img{
        display: block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
      }
    }
  }
  .el-aside{
    background-color: #324157;
  }
  .el-main{
    background-color: #FFFFFF;
  }
  .el-footer{
    background-color: #242F42;
    color: #fff;
    text-align: center;
  }
</style>
